package com.cloud.rou.im.protocol.cmd;

import com.cloud.rou.im.core.base.BaseConstants;
import com.cloud.rou.im.msg.Msg;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Map;

/**
 * <p></p>
 *
 * @author GaoShuangWen
 * @since 2019-10-29 10:57
 */
@Data
@NoArgsConstructor
public class Cmd implements Serializable {

    /**
     * type of the cmd
     */
    private byte type ;


    /**
     * async
     */
    byte async = BaseConstants.isTrue;

    private Msg msg;

    /**
     * set the request type
     * @return the request type
     */
    //public abstract Integer requestType();

    public Cmd async(boolean async){
        this.async=async?BaseConstants.isTrue:BaseConstants.isFalse;
        return this;
    }
}
